from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QApplication,QWidget,QHBoxLayout,QVBoxLayout
from PyQt5.QtWidgets import QPushButton,QLineEdit
import sys


def on_submit():
    print("用户名:",edit_user.text())
    print("密码:",edit_pwd.text())
    print("手机号:",edit_phone.text())  
    
    #给按钮添加/关联点击事件（函数）
if __name__ == '__main__':

    
    # 创建应用程序
    app = QApplication(sys.argv)
    
    # 创建窗口

    w = QWidget()
    #设置窗口标题
    w.setWindowTitle("布局嵌套")
    #  创建水平布局 HorizontalLayout    垂直布局 VerticalLayout
    root_layout = QHBoxLayout()
    w.setLayout(root_layout)
   
    #第一列
    col1_layout = QVBoxLayout()
    col1_layout.addWidget(QPushButton("1"))
    #第二列
    col2_layout = QVBoxLayout()
    col2_layout.addWidget(QPushButton("1"))
    col2_layout.addWidget(QPushButton("2"))
    
    col3_layout = QVBoxLayout()
    col3_layout.addWidget(QPushButton("1"))
    col3_layout.addWidget(QPushButton("2"))
    col3_layout.addWidget(QPushButton("3"))
    
    col4_layout = QVBoxLayout()
    col4_layout.addWidget(QPushButton("1"))
    col4_layout.addWidget(QPushButton("2"))
    col4_layout.addWidget(QPushButton("3"))
    col4_layout.addWidget(QPushButton("4"))
    
    
    root_layout.addLayout(col1_layout)
    root_layout.addLayout(col2_layout)
    root_layout.addLayout(col3_layout)
    root_layout.addLayout(col4_layout)

    #显示窗口
    #提交  
    w.show()

    #等待窗口停止
    sys.exit(app.exec())